package com.ruoyi.smart.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.smart.mapper.SmartQualityFormMapper;
import com.ruoyi.smart.domain.SmartQualityForm;
import com.ruoyi.smart.service.ISmartQualityFormService;

/**
 * 质检报告单默认值Service业务层处理
 * 
 * @author minwei
 * @date 2023-03-12
 */
@Service
public class SmartQualityFormServiceImpl implements ISmartQualityFormService 
{
    @Autowired
    private SmartQualityFormMapper smartQualityFormMapper;

    /**
     * 查询质检报告单默认值
     * 
     * @param id 质检报告单默认值主键
     * @return 质检报告单默认值
     */
    @Override
    public SmartQualityForm selectSmartQualityFormById(Long id)
    {
        return smartQualityFormMapper.selectSmartQualityFormById(id);
    }

    /**
     * 查询质检报告单默认值列表
     * 
     * @param smartQualityForm 质检报告单默认值
     * @return 质检报告单默认值
     */
    @Override
    public List<SmartQualityForm> selectSmartQualityFormList(SmartQualityForm smartQualityForm)
    {
        return smartQualityFormMapper.selectSmartQualityFormList(smartQualityForm);
    }

    /**
     * 新增质检报告单默认值
     * 
     * @param smartQualityForm 质检报告单默认值
     * @return 结果
     */
    @Override
    public int insertSmartQualityForm(SmartQualityForm smartQualityForm)
    {
        smartQualityForm.setCreateTime(DateUtils.getNowDate());
        return smartQualityFormMapper.insertSmartQualityForm(smartQualityForm);
    }

    /**
     * 修改质检报告单默认值
     * 
     * @param smartQualityForm 质检报告单默认值
     * @return 结果
     */
    @Override
    public int updateSmartQualityForm(SmartQualityForm smartQualityForm)
    {
        smartQualityForm.setUpdateTime(DateUtils.getNowDate());
        return smartQualityFormMapper.updateSmartQualityForm(smartQualityForm);
    }

    /**
     * 批量删除质检报告单默认值
     * 
     * @param ids 需要删除的质检报告单默认值主键
     * @return 结果
     */
    @Override
    public int deleteSmartQualityFormByIds(Long[] ids)
    {
        return smartQualityFormMapper.deleteSmartQualityFormByIds(ids);
    }

    /**
     * 删除质检报告单默认值信息
     * 
     * @param id 质检报告单默认值主键
     * @return 结果
     */
    @Override
    public int deleteSmartQualityFormById(Long id)
    {
        return smartQualityFormMapper.deleteSmartQualityFormById(id);
    }
}
